<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>信息管理</title>
    <!--自适应各种移动设备-->
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />

    <link rel="stylesheet" href="/css/font.css">
    <link rel="stylesheet" href="/css/xadmin.css">
    <script type="text/javascript" src="/js/jquery-3.2.1.min.js"></script>
    <script src="/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/js/xadmin.js"></script>

</head>
<body>
<!-- 顶部开始 -->
<div class="container">
    <div class="logo"><a href="../../static/index.html">仓库管理系统</a></div>
    <div class="left_open">
        <i title="展开左侧栏" class="iconfont">&#xe699;</i>
    </div>
    <ul class="layui-nav left fast-add" lay-filter="">
        <li class="layui-nav-item">
<!--            <a href="javascript:;">+新增</a>-->
<!--            <dl class="layui-nav-child"> &lt;!&ndash; 二级菜单 &ndash;&gt;-->
<!--                <dd><a onclick="x_admin_show('资讯','http://www.baidu.com')"><i class="iconfont">&#xe6a2;</i>资讯</a></dd>-->
<!--                <dd><a onclick="x_admin_show('图片','http://www.baidu.com')"><i class="iconfont">&#xe6a8;</i>图片</a></dd>-->
<!--                <dd><a onclick="x_admin_show('用户','http://www.baidu.com')"><i class="iconfont">&#xe6b8;</i>用户</a></dd>-->
<!--            </dl>-->
        </li>
    </ul>
    <ul class="layui-nav right" lay-filter="">
        <li class="layui-nav-item">
            <a href="javascript:;">
                <img id="avatar" src="/images/bj.jpg" width="40px" height="40px">
                <span th:text="${session.user.identity}"></span>
                <span >:</span>
                <span th:text="${session.user.name}"></span>
                <span style="display:none" id="tel" th:text="${session.user.tel}"></span>
            </a>
            <dl class="layui-nav-child"> <!-- 二级菜单 -->
                <dd><a onclick="updateUser(this)" >修改信息</a></dd>
                <dd><a onclick="logOut(this)">注销登录</a></dd>
            </dl>
        </li>
    </ul>

</div>
<!-- 顶部结束 -->
<!-- 中部开始 -->
<!-- 左侧菜单开始 -->
<div class="left-nav">
    <div id="side-nav">
        <ul id="nav">
            <li>
                <a href="javascript:;">
                    <i class="iconfont">&#xe6b8;</i>
                    <cite>入库管理</cite>
                    <i class="iconfont nav_right">&#xe697;</i>
                </a>
                <ul class="sub-menu">
                    <li>
                        <a _href="/warehousing/purchaseList">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>采购入库</cite>

                        </a>
                    </li >
                </ul>
                <ul class="sub-menu">
                    <li>
                        <a _href="/return">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>采购退货</cite>

                        </a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="javascript:;">
                    <i class="iconfont">&#xe723;</i>
                    <cite>出库管理</cite>
                    <i class="iconfont nav_right">&#xe697;</i>
                </a>
                <ul class="sub-menu">
                    <li>
                        <a _href="/outOfStorage/out">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>货品出库</cite>
                        </a>
                    </li >
                </ul>
                <ul class="sub-menu">
                    <li>
                        <a _href="/productReturn/return">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>客户退货</cite>
                        </a>
                    </li >
                </ul>
            </li>
            <li>
                <a href="javascript:;">
                    <i class="iconfont">&#xe726;</i>
                    <cite>库存管理</cite>
                    <i class="iconfont nav_right">&#xe697;</i>
                </a>
                <ul class="sub-menu">
                    <li>
                        <a _href="/damages">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>货品调拨</cite>
                        </a>
                    </li >
                </ul>
                <ul class="sub-menu">
                    <li>
                        <a _href="/transfer">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>货品报损</cite>
                        </a>
                    </li >
                </ul>
            </li>
            <li>
<!--                <a href="javascript:;">-->
                <a _href="/chart">
                    <i class="iconfont">&#xe6ce;</i>
                    <cite>统计报表</cite>
                    <i class="iconfont nav_right">&#xe697;</i>
                </a>
            </li>
            <li>
                <a href="javascript:;">
                    <i class="iconfont">&#xe6ce;</i>
                    <cite>基础数据管理</cite>
                    <i class="iconfont nav_right">&#xe697;</i>
                </a>
                <ul class="sub-menu">
                    <li>
                        <a _href="/warehouse/warehouseList">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>仓库管理</cite>

                        </a>
                    </li >
                </ul>
                <ul class="sub-menu">
                    <li>
                        <a _href="/supplier/supplierList">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>供应商管理</cite>

                        </a>
                    </li>
                </ul>
                <ul class="sub-menu">
                    <li>
                        <a _href="/customer/customerList">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>客户管理</cite>

                        </a>
                    </li>
                </ul>
            </li>
            <li>
                <a _href="/userAdmin/list">
                    <i class="iconfont">&#xe6ce;</i>
                    <cite>安全管理</cite>
                    <i class="iconfont nav_right">&#xe697;</i>
                </a>
            </li>
        </ul>
    </div>
</div>
<!-- <div class="x-slide_left"></div> -->
<!-- 左侧菜单结束 -->
<!-- 右侧主体开始 -->
<div class="page-content">
    <div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">
        <ul class="layui-tab-title">
            <li>我的桌面</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <iframe src='/chart' frameborder="0" scrolling="yes" class="x-iframe"></iframe>
            </div>
        </div>
    </div>
</div>
<div class="page-content-bg"></div>
<!-- 右侧主体结束 -->
<!-- 中部结束 -->
<!-- 底部开始 -->
<div class="footer">
    <div class="copyright">Copyright ©2021 yzlw


        <div style="float:right;margin-right: 4px">鸣谢
            <style type="text/css">
                .link{
                    color: #1E9FFF;
                }
            </style>
            <a class="link" href="https://echarts.apache.org/zh/index.html">ECharts</a>|
            <a class="link" href="https://console.upyun.com/">又拍云</a>|
            <a class="link" href="https://www.layui.com/">layui</a>
        </div>
    </div>


</div>
</body>
</html>

<script type="text/javascript">
    // 初始化头像
    $.ajax({
        url:"/index/identity",
        type:"get",
        dataType:"json",
        success:function (data) {
            if(data.identity != null){
                document.getElementById("avatar").src = "/images/"+ data.identity +".png";
            }
        }
    })
    //打开修改用户信息页面
    function updateUser(obj) {
        var tel = document.getElementById("tel").value;
        //打开弹窗
        x_admin_show('修改信息','/index/updateUserPage?tel='+tel,500,300);
    }
    //注销登录
    function logOut(obj) {
        $.ajax({
            url:"/index/logOut",
            type:"post",
            data:{"aaa": 0},
            dataType:"json", //返回的数据类型
            success:function (data) {
                console.log(data.info);
                if(data.info == "登出成功"){
                    window.location.href = "/login/loginPage";
                }
            }
        })
    }

</script>